﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace WebShop.Contracts
{
    public class ProductReport
    {
        public string ProductName { get; set; }
        public int ProductID { get; set; }
        public string CategoryName { get; set; }
        public int CategoryID { get; set; }
        public int Amount { get; set; }
        public decimal Sum { get; set; }
    }

    public class ProductsReport
    {
        public List<ProductReport> Products { get; set; }

        [DataType(DataType.Date)]
        public DateTime? StartDate { get; set; }

        [DataType(DataType.Date)]
        public DateTime? EndDate { get; set; }

        public ProductsReport(List<ProductReport> products, DateTime? startDate, DateTime? endDate)
        {
            StartDate = startDate;
            EndDate = endDate;
            Products = products;
        }
    }
}
